import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'depotBillIn/add',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'depotBillIn/delete',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'depotBillIn/update',
    method: 'put',
    data
  })
}

export function page() {
  return request({
    url: 'depotBillIn/page',
    method: 'get'
  })
}

export function getOne(id) {
  return request({
    url: '/depotBillIn/' + id,
    method: 'get',
    params: id
  })
}
export function all(params) {
  return request({
    url: '/depotBillIn/all',
    method: 'get',
    params: params
  })
}
export function priceCheck(productId) {
  return request({
    url: 'depotBillIn/priceCheck',
    method: 'get',
    params: productId
  })
}
export function audit(data) {
  return request({
    url: 'depotBillIn/audit',
    method: 'put',
    data
  })
}
export function billInItemPage(params) {
  return request({
    url: 'depotBillIn/billInItemPage',
    method: 'get',
    params
  })
}

export default { add, edit, del, page, getOne, priceCheck, audit, billInItemPage, all }
